package com.yx.sys.controller;

import com.yx.common.vo.Result;
import com.yx.sys.entity.Edition;
import com.yx.sys.entity.Post;
import com.yx.sys.service.IEditionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 版本：网页、小程序、软件等 前端控制器
 * </p>
 *
 * @author yx
 * @since 2023-02-14
 */
@RestController
@RequestMapping("/edition")
public class EditionController {
    @Autowired
    private IEditionService iEditionService;

    @GetMapping("/all")
    public Result<List<Edition>> getAllEdition(){
        List<Edition> list = iEditionService.list();
        return Result.success(list,"查询所有Edition信息成功");
    }
}
